package com.itheima.app.cotroller;

import com.itheima.app.manager.FocusUserManager;
import com.itheima.service.mongo.FocusUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FocusUserController {

    @Autowired
    private FocusUserManager focusUserManager;

    //关注
    @PostMapping("/smallVideos/{focusUserId}/userFocus")
    public void saveFocusUser(@PathVariable Long focusUserId){
        focusUserManager.saveFocusUser(focusUserId);
    }

    //取消关注
    @PostMapping("/smallVideos/{focusUserId}/userUnFocus")
    public void remove(@PathVariable Long focusUserId){
        focusUserManager.removeFocusUser(focusUserId);
    }

}
